<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="UTF-8" lang="UTF-8">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="Content-Language" content="UTF-8" />
        <title></title>
        <link href="__PUBLIC__/Skins/Default/index.css" rel="stylesheet" type="text/css" />
    </head>
    <script charset="utf-8" src="__PUBLIC__/tools/kindeditor-min.js"></script>
    <link rel="stylesheet" href="__PUBLIC__/tools/themes/default/default.css" />
    <link rel="stylesheet" href="__PUBLIC__/tools/plugins/code/prettify.css" />
    <script charset="utf-8" src="__PUBLIC__/tools/lang/zh_CN.js"></script>
    <script charset="utf-8" src="__PUBLIC__/tools/plugins/code/prettify.js"></script>
    <script>
        KindEditor.ready(function(K) {
            var editor1 = K.create('textarea[name="content"]', {
                //				cssPath : '__PUBLIC__/kindeditor/plugins/code/prettify.css',
                //				uploadJson : '__PUBLIC__/kindeditor/php/upload_json.php',
                //				fileManagerJson : '__PUBLIC__/kindeditor/php/file_manager_json.php',
                allowFileManager : true,
                afterCreate : function() {
                    var self = this;
                    K.ctrl(document, 13, function() {
                        self.sync();
                        K('form[name=example]')[0].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function() {
                        self.sync();
                        K('form[name=example]')[0].submit();
                    });
                }
            });
            prettyPrint();
        });
    </script>
    <script language="javascript">
        function s1change(s1)
        {
            //            alert(s1.value);
            if(s1.value=="5")
            {
                document.getElementById("select2").style.display = 'block';
            }
        }
        window.onload=s1change(document.getElementById("s1"));
    </script>
    <body onload="window.mnlst.sort.value='{$newsinfo.sort}';window.mnlst.hy.value='{$newsinfo.hy}';window.mnlst.flag.value='{$newsinfo.flag}'">
        <form action="__APP__/AdminNews/editnews" method="post" name="mnlst" id="mnlst" enctype="multipart/form-data">
            <table width="100%" height="295" border="0" align="center" cellpadding="1" cellspacing="1" class="table01">
                <tr>
                    <td height="24" colspan="4" class="table_top">新闻发布</td>
                </tr>
                <tr>
                    <td width="12%" height="25" class="td_title">所属新闻类别</td>
                    <td colspan="3" class="table_content"><label>
                            <select name="sort" id="select" onchange="s1change(this);">
                                <volist name="sortlist" id="sortl">
                                    <option value="{$sortl.id}">{$sortl.name}</option>
                                </volist>
                            </select>
                        </label></td>
                </tr>
                <tr>
                    <td height="26" class="td_title">所属行业</td>
                    <td colspan="3" class="table_content">
                        <select name="hy" id="select2" <neq name="newsinfo.sort" value="5">style="display: none"</neq> >
                            <volist name="xylist" id="xyl">
                                <option value="{$xyl.id}">{$xyl.name}</option>
                            </volist>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td height="26" class="td_title">新闻标题</td>
                    <td colspan="3" class="table_content"><input type="text" name="title" value="{$newsinfo.title}" /></td>
                </tr>
                <tr>
                    <td height="26" class="td_title"><span class="td_hui">新闻位置</span></td>
                    <td height="26" colspan="3" class="table_content">
                        <select name="flag" id="select" >
                            <option value="0">无特殊位置</option>
                            <option value="1">首页头条</option>
                            <option value="2">频道首页头条</option>
                            <option value="3">热点文章</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td height="15" class="td_title">新闻图片</td>
                    <td height="15" colspan="3" class="table_content"><input type="file" name="photo" value="{$newinfo.logo_img}">
                    </td>
                </tr>
                <tr>
                    <td height="7" class="td_title">文章来源</td>
                    <td width="17%" height="7" class="table_content"><input type="text" name="originate" value="{$newsinfo.originate}" /></td>
                    <td width="5%" class="table_content">作者    </td>
                    <td width="66%" class="table_content"><input type="text" name="editor" value="{$newsinfo.editor}" /></td>
                </tr>
                <!--                <tr>
                                    <td height="3" class="td_title">关键词</td>
                                    <td height="3" colspan="3" class="table_content"><input type="text" name="textfield5" />
                                        多个关键词用空格隔开</td>
                                </tr>-->
                <tr>
                    <td height="4" class="td_title">内容摘要</td>
                    <td height="4" colspan="3" class="table_content"><textarea name="intro" cols="50" rows="5">{$newsinfo.intro}</textarea></td>
                </tr>
                <tr>
                    <td height="24" class="td_title">新闻内容</td>
                    <td height="24" colspan="3" class="table_content"><textarea name="content" style="width:800px;height:400px;visibility:hidden;">{$newsinfo.content}</textarea>
                    </td>
                </tr>
                <tr>
                    <td height="23" class="td_title">审核</td>
                    <td height="23" colspan="3" class="table_content"><label>
                            <input type="checkbox" name="shei" id="checkbox3" value="1" <eq name="newsinfo.shei" value="1">checked=true</eq> />
                            <input type="hidden" name="id" value="{$newsinfo.id}" />
                        </label>
                        通过审核</td>
                </tr>
                <!--                <tr>
                                    <td height="23" class="td_title">添加时间</td>
                                    <td height="23" colspan="3" class="table_content"><input name="textfield6" type="text" /></td>
                                </tr>
                                <tr>
                                    <td height="23" class="td_title">&nbsp;</td>
                                    <td height="23" colspan="3" class="table_content">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td height="23" class="td_title">浏览次数：</td>
                                    <td height="23" colspan="3" class="table_content"><input name="textfield3" type="text" value="0" /></td>
                                </tr>-->
                <tr>
                    <td height="32" colspan="4" class="table_bottom"><input name="Submit" type="submit" class="erzi" value="发布" />
                        <input name="Submit2" type="submit" class="erzi" value="取消" /></td>
                </tr>
            </table>
        </form>
    </body>
    <script type="text/javascript">
        function submitForm(formId){
            var from = $("#"+formId);
            var postUrl = from.attr("action");
            common.addMask('#FFFFFF',0.5);
            $.post(postUrl,from.serialize(),function(data){
                if(data){
                    $("#errorInfo").html(data);
                }else{
                    $("#errorInfo").html("操作成功");
                    $("#reset").click();
                }
                common.removeMask();

            });
            return false;
        }
    </script>
</html>
